﻿CREATE TABLE [dbo].[AmixAnsamble] (
    [IDAnsamblu]       INT IDENTITY (1, 1) NOT NULL,
    [IDMFixPrincipal]  INT NOT NULL,
    [IDMfixComponenta] INT NOT NULL,
    CONSTRAINT [PK_AmixAnsamble] PRIMARY KEY CLUSTERED ([IDAnsamblu] ASC),
    CONSTRAINT [FK_AmixAnsamble_AmixRegistru] FOREIGN KEY ([IDMfixComponenta]) REFERENCES [dbo].[AmixRegistru] ([IDMijlocFix]),
    CONSTRAINT [FK_AmixAnsamble_AmixRegistru1] FOREIGN KEY ([IDMFixPrincipal]) REFERENCES [dbo].[AmixRegistru] ([IDMijlocFix]),
    CONSTRAINT [IX_AmixAnsamble] UNIQUE NONCLUSTERED ([IDMfixComponenta] ASC, [IDMFixPrincipal] ASC)
);

